package com.neu.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neu.po.Menu;
import com.neu.po.ResponseResult;
import com.neu.service.MenuService;

@RestController
@RequestMapping("menu")
public class MenuController {
//1
	@Autowired
	private MenuService menuService; 
	
	@RequestMapping("getAll")
	public ResponseResult getAll() {
		ResponseResult result = new ResponseResult();
		
		List<Menu> list = menuService.getAll();
		
		result.setData(list);
		
		return result;
		
	}
	
}
